{extend name="base" /}
{block name="title"}后台管理-网络报修管理{/block}
{block name="main"}
<div class="widget-body">
    Types: <select name="reporttype" id="reporttype">
        {volist name="reporttype" id="vo"}
            {if condition="$vo.rtid == $currenttype.rtid"}
            <option value="{$vo.rtid}" selected>{$vo.reportname}</option>
            {else/}
            <option value="{$vo.rtid}">{$vo.reportname}</option>
            {/if}
        <!-- <option value="{$vo.rtid}">{$vo.reportname}</option> -->
        {/volist}
    </select>
    <a href="{:url('report/done')}">显示已处理问题</a>
    <table id="users" class="table table-striped table-bordered dataTable">
        <thead>
        <tr>
            <th>提交人昵称</th>
            <th>内容</th>
            <th>学号</th>
            <th>电话</th>
            <th>图片</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        {volist name="report"  id="vo"}
        <tr title="{$vo.rcontent}">
            <td>{$vo.name}</td>
            <td><div class="line-limit-length">{$vo.rcontent}</div></td>
            <td>{$vo.sNumber}</td>
            <td>{$vo.teleNumber}</td>
            <td>{$vo.pic}</td>
            <td>
                <div class="btn-group">
                    <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
                        操作
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu pull-right">
                        <li><a href="{:url('del',['id'=>$vo.rid])}"><i class="icon-trash"></i> 删除</a></li>
                    </ul>
                </div>

            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div> <!-- /widget-body -->
<script src="__STATIC__/assets/js/jquery.min.js"></script>
<script>
    $("select[name='reporttype']").on("change",function () {
        console.log($(this).val());
        var rid = $(this).val();
        location.href = "{:url('report/change')}?rid="+rid;
    })
</script>
{/block}
